import request from '@/utils/request';

/**
 * （不建议写成 request.post(xxx)，因为这样 post 时，无法 params 与 data 同时传参）
 *
 * 登录api接口集合
 * @method signIn 用户登录
 * @method signOut 用户退出登录
 */

// 添加订单
export function addordergoods(data: object) {
    return request({
        url: '/order/addorder',
        method: 'post',
        data,
    });
}

// 查询订单
export function saveOrderlist(params: object) {
    return request({
        url: '/order/saveOrderlist',
        method: 'get',
        params: params,
    });
}

// 查询全部订单
export function saveAllOrderlist(params: object) {
    return request({
        url: '/order/saveAllOrderlist',
        method: 'get',
        params: params,
    });
}

// 删除订单
export function deleteOrder(params: object) {
    return request({
        url: '/order/deleteorder',
        method: 'get',
        params: params,
    });
}

// 修改订单
export function changeordergoods(data: object) {
    return request({
        url: '/order/changeorderItem',
        method: 'post',
        data,
    });
}